package com.ysyc.driver_ee.model;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.Date;

/**
 * <p>描述：(这里用一句话描述这个类的作用)</p>
 * 作者： Chan<br>
 * 日期： 2018/11/7 16:15<br>
 * 版本： v1.0<br>
 */
public class OrderForm implements Parcelable {

    /***	装货地	  */
    public String startName;
    /***	装货地地图数据	  */
    public String startMap;
    /***	卸货地	  */
    public String endName;
    /***	卸货地地图数据	  */
    public String endMap;
    /***	订单备注	  */
    public String remake;
    /***	负责人名字	  */
    public String principalName;
    /***	负责人电话	  */
    public String principalTel;
    /***	装货人姓名	  */
    public String shipperName;
    /***	装货人电话	  */
    public String shipperTel;
    /***	卸货人姓名	  */
    public String deliveryName;
    /***	卸货人电话	  */
    public String deliveryTel;
    /***	要求装货时间	  */
    public Long startArriveTime;
    /***	订单完成时间	  */
    public Long finishTime;
    /***	订单金额，单位为分	  */
    public Integer price;
    /***	订单状态 0为未接单 1为已接单(即待装货) 2为到达装货地(即装货中) 3为已装货(即正在送货中) 4为已完成	  */
    public Integer status;
    /***	订单编号	  */
    public String orderNumber;
    /***	所属项目名	  */
    public String projectName;
    /***	下级司机姓名	  */
    public String driverMap;
    public String driverName;
    /***	司机地址	  */
    /***	司机所在地名字，如光谷生物城	  */
    public String driverMapName;
    /***	司机的运输状态 0位空闲 1为待装货 2为装货中 3为正在送货中	  */
    public Integer transportStatus;

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.startName);
        dest.writeString(this.startMap);
        dest.writeString(this.endName);
        dest.writeString(this.endMap);
        dest.writeString(this.remake);
        dest.writeString(this.principalName);
        dest.writeString(this.principalTel);
        dest.writeString(this.shipperName);
        dest.writeString(this.shipperTel);
        dest.writeString(this.deliveryName);
        dest.writeString(this.deliveryTel);
        dest.writeValue(this.startArriveTime);
        dest.writeValue(this.finishTime);
        dest.writeValue(this.price);
        dest.writeValue(this.status);
        dest.writeString(this.orderNumber);
        dest.writeString(this.projectName);
        dest.writeString(this.driverMap);
        dest.writeString(this.driverName);
        dest.writeString(this.driverMapName);
        dest.writeValue(this.transportStatus);
    }

    public OrderForm() {
    }

    protected OrderForm(Parcel in) {
        this.startName = in.readString();
        this.startMap = in.readString();
        this.endName = in.readString();
        this.endMap = in.readString();
        this.remake = in.readString();
        this.principalName = in.readString();
        this.principalTel = in.readString();
        this.shipperName = in.readString();
        this.shipperTel = in.readString();
        this.deliveryName = in.readString();
        this.deliveryTel = in.readString();
        this.startArriveTime = (Long) in.readValue(Long.class.getClassLoader());
        this.finishTime = (Long) in.readValue(Long.class.getClassLoader());
        this.price = (Integer) in.readValue(Integer.class.getClassLoader());
        this.status = (Integer) in.readValue(Integer.class.getClassLoader());
        this.orderNumber = in.readString();
        this.projectName = in.readString();
        this.driverMap = in.readString();
        this.driverName = in.readString();
        this.driverMapName = in.readString();
        this.transportStatus = (Integer) in.readValue(Integer.class.getClassLoader());
    }

    public static final Parcelable.Creator<OrderForm> CREATOR = new Parcelable.Creator<OrderForm>() {
        @Override
        public OrderForm createFromParcel(Parcel source) {
            return new OrderForm(source);
        }

        @Override
        public OrderForm[] newArray(int size) {
            return new OrderForm[size];
        }
    };
}
